home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tk4.0 / Makefile.in < prev    next >
Makefile  |  1995-06-30  |  14KB  |  421 lines

  1. #
  2. # This file is a Makefile for Tk.  If it has the name "Makefile.in"
  3. # then it is a template for a Makefile;  to generate the actual Makefile,
  4. # run "./configure", which is a configuration script generated by the
  5. # "autoconf" program (constructs like "@foo@" will get replaced in the
  6. # actual Makefile.
  7. #
  8. # @(#) Makefile.in 1.39 95/06/30 11:18:46
  9.  
  10. # Current Tk version;  used in various names.
  11.  
  12. VERSION = 4.0
  13.  
  14. #----------------------------------------------------------------
  15. # Things you can change to personalize the Makefile for your own
  16. # site (you can make these changes in either Makefile.in or
  17. # Makefile, but changes to Makefile will get lost if you re-run
  18. # the configuration script).
  19. #----------------------------------------------------------------
  20.  
  21. # Default top-level directories in which to install architecture-
  22. # specific files (exec_prefix) and machine-independent files such
  23. # as scripts (prefix).  The values specified here may be overridden
  24. # at configure-time with the --exec-prefix and --prefix options
  25. # to the "configure" script.
  26.  
  27. prefix =        @prefix@
  28. exec_prefix =        @exec_prefix@
  29.  
  30. # The following definition can be set to non-null for special systems
  31. # like AFS with replication.  It allows the pathnames used for installation
  32. # to be different than those used for actually reference files at
  33. # run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
  34. # when installing files.
  35. INSTALL_ROOT =
  36.  
  37. # Directory from which applications will reference the library of Tcl
  38. # scripts (note: you can set the TK_LIBRARY environment variable at
  39. # run-time to override the compiled-in location):
  40. TK_LIBRARY =        $(prefix)/lib/tk$(VERSION)
  41.  
  42. # Path name to use when installing library scripts:
  43. SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(TK_LIBRARY)
  44.  
  45. # Directory in which to install the archive libtk.a:
  46. LIB_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/lib
  47.  
  48. # Directory in which to install the program wish:
  49. BIN_INSTALL_DIR =    $(INSTALL_ROOT)$(exec_prefix)/bin
  50.  
  51. # Directory from which the program wish should be referenced by scripts:
  52. BIN_DIR =        $(exec_prefix)/bin
  53.  
  54. # Directory in which to install the include file tk.h:
  55. INCLUDE_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/include
  56.  
  57. # Top-level directory for manual entries:
  58. MAN_INSTALL_DIR =    $(INSTALL_ROOT)$(prefix)/man
  59.  
  60. # Directory in which to install manual entry for wish:
  61. MAN1_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man1
  62.  
  63. # Directory in which to install manual entries for Tk's C library
  64. # procedures:
  65. MAN3_INSTALL_DIR =    $(MAN_INSTALL_DIR)/man3
  66.  
  67. # Directory in which to install manual entries for the built-in
  68. # Tcl commands implemented by Tk:
  69. MANN_INSTALL_DIR =    $(MAN_INSTALL_DIR)/mann
  70.  
  71. # The directory containing the Tcl sources and headers appropriate
  72. # for this version of Tk ("srcdir" will be replaced or has already
  73. # been replaced by the configure script):
  74. TCL_DIR =        @srcdir@/../tcl7.4
  75.  
  76. # The directory containing the Tcl library archive file appropriate
  77. # for this version of Tk:
  78. TCL_BIN_DIR =        ../tcl7.4
  79.  
  80. # A "-I" switch that can be used when compiling to make all of the
  81. # X11 include files accessible (the configure script will try to
  82. # set this value, and will cause it to be an empty string if the
  83. # include files are accessible via /usr/include).
  84. X11_INCLUDES =        @XINCLUDES@
  85.  
  86. # Linker switch(es) to use to link with the X11 library archive (the
  87. # configure script will try to set this value automatically, but you
  88. # can override it).
  89. X11_LIB_SWITCHES =    @XLIBSW@
  90.  
  91. # Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
  92. # and the math library (in that order).  The "LIBS" part will be
  93. # replaced (or has already been replaced) with relevant libraries as
  94. # determined by the configure script.
  95. LIBS = libtk.a $(TCL_BIN_DIR)/libtcl.a $(X11_LIB_SWITCHES) @LIBS@ @MATH_LIBS@
  96.  
  97. # To change the compiler switches, for example to change from -O
  98. # to -g, change the following line:
  99. CFLAGS = -O
  100.  
  101. # To turn off the security checks that disallow incoming sends when
  102. # the X server appears to be insecure, reverse the comments on the
  103. # following lines:
  104. SECURITY_FLAGS =
  105. #SECURITY_FLAGS = -DTK_NO_SECURITY
  106.  
  107. # To disable ANSI-C procedure prototypes reverse the comment characters
  108. # on the following lines:
  109. PROTO_FLAGS =
  110. #PROTO_FLAGS = -DNO_PROTOTYPE
  111.  
  112. # To enable memory debugging reverse the comment characters on the following
  113. # lines.  Warning:  if you enable memory debugging, you must do it
  114. # *everywhere*, including all the code that calls Tcl, and you must use
  115. # ckalloc and ckfree everywhere instead of malloc and free.
  116. MEM_DEBUG_FLAGS =
  117. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  118.  
  119. # If your X server is X11R4 or earlier, then you may wish to reverse
  120. # the comment characters on the following two lines.  This will enable
  121. # extra code to speed up XStringToKeysym.  In X11R5 and later releases
  122. # XStringToKeysym is plenty fast, so you needn't define REDO_KEYSYM_LOOKUP.
  123. KEYSYM_FLAGS =
  124. #KEYSYM_FLAGS = -DREDO_KEYSYM_LOOKUP
  125.  
  126. # Some versions of make, like SGI's, use the following variable to
  127. # determine which shell to use for executing commands:
  128. SHELL =        /bin/sh
  129.  
  130. # Tk used to let the configure script choose which program to use
  131. # for installing, but there are just too many different versions of
  132. # "install" around;  better to use the install-sh script that comes
  133. # with the distribution, which is slower but guaranteed to work.
  134.  
  135. INSTALL = @srcdir@/install-sh -c
  136.  
  137. #----------------------------------------------------------------
  138. # The information below is modified by the configure script when
  139. # Makefile is generated from Makefile.in.  You shouldn't normally
  140. # modify any of this stuff by hand.
  141. #----------------------------------------------------------------
  142.  
  143. AC_FLAGS =        @DEFS@
  144. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  145. INSTALL_DATA =        @INSTALL_DATA@
  146. RANLIB =        @RANLIB@
  147. SRC_DIR =        @srcdir@
  148. VPATH =            @srcdir@
  149.  
  150. #----------------------------------------------------------------
  151. # The information below should be usable as is.  The configure
  152. # script won't modify it and you shouldn't need to modify it
  153. # either.
  154. #----------------------------------------------------------------
  155.  
  156.  
  157. CC =        @CC@
  158. CC_SWITCHES =    ${CFLAGS} -I${SRC_DIR} -I${TCL_DIR} ${X11_INCLUDES} \
  159. ${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
  160. ${KEYSYM_FLAGS} -DTK_LIBRARY=\"${TK_LIBRARY}\"
  161.  
  162. WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
  163.     tkMenu.o tkMenubutton.o tkMessage.o tkScale.o \
  164.     tkScrollbar.o
  165.  
  166. CANVOBJS = tkCanvas.o tkCanvArc.o tkCanvBmap.o tkCanvImg.o \
  167.     tkCanvLine.o tkCanvPoly.o tkCanvPs.o tkCanvText.o \
  168.     tkCanvUtil.o tkCanvWind.o tkRectOval.o tkTrig.o
  169.  
  170. IMAGEOBJS = tkImage.o tkImgBmap.o tkImgFmtGIF.o tkImgFmtPPM.o tkImgPhoto.o
  171.  
  172. TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextIndex.o \
  173.     tkTextMark.o tkTextTag.o tkTextWind.o
  174.  
  175. OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \
  176.     tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
  177.     tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o \
  178.     tkMain.o tkOption.o tkPack.o tkPlace.o \
  179.     tkPreserve.o tkSelect.o tkSend.o tkUnix.o tkUtil.o tkVisual.o \
  180.     tkWindow.o tkWm.o tkXEvent.o tkXId.o \
  181.     $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS)
  182.  
  183. SRCS = tk3d.c tkArgv.c tkAtom.c tkBind.c tkBitmap.c tkClipboard.c tkCmds.c \
  184.     tkColor.c tkConfig.c tkCursor.c tkError.c tkEvent.c \
  185.     tkFocus.c tkFont.c tkGet.c tkGC.c tkGeometry.c tkGrab.c \
  186.     tkMain.c tkOption.c tkPack.c tkPlace.c \
  187.     tkPreserve.c tkSelect.c tkSend.c tkUnix.c tkUtil.c tkVisual.c \
  188.     tkWindow.c tkWm.c tkXEvent.c tkXId.c \
  189.     tkButton.c tkEntry.c tkFrame.c tkListbox.c \
  190.     tkMenu.c tkMenubutton.c tkMessage.c tkScale.c \
  191.     tkScrollbar.c tkCanvas.c tkCanvArc.c tkCanvBmap.c tkCanvImg.c \
  192.     tkCanvLine.c tkCanvPoly.c tkCanvPs.c tkCanvText.c \
  193.     tkCanvUtil.c tkCanvWind.c tkRectOval.c tkTrig.c \
  194.     tkImage.c tkImgBmap.c tkImgFmtGIF.c tkImgFmtPPM.c tkImgPhoto.c \
  195.     tkText.c tkTextBTree.c tkTextDisp.c tkTextIndex.c \
  196.     tkTextMark.c tkTextTag.c tkTextWind.c tkAppInit.c \
  197.     tkSquare.c tkTest.c
  198.  
  199. HDRS = default.h ks_names.h patchlevel.h tk.h tkCanvas.h tkInt.h  \
  200.     tkPort.h tkText.h
  201.  
  202. DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
  203.  
  204. all: libtk.a wish
  205.  
  206. libtk.a: $(OBJS)
  207.     rm -f libtk.a
  208.     ar cr libtk.a $(OBJS)
  209.     $(RANLIB) libtk.a
  210.  
  211. wish: tkAppInit.o libtk.a $(TCL_BIN_DIR)/libtcl.a
  212.     $(CC) $(CC_SWITCHES) tkAppInit.o $(LIBS) -o wish
  213.  
  214. tktest: tkTest.o tkSquare.o libtk.a $(TCL_BIN_DIR)/libtcl.a
  215.     ${CC} ${CC_SWITCHES} tkTest.o tkSquare.o $(LIBS) -o tktest
  216.  
  217. test: tktest
  218.     @cwd=`pwd`; \
  219.     cd $(TCL_DIR); TCL_LIBRARY=`pwd`/library; export TCL_LIBRARY; \
  220.     cd $$cwd; cd $(SRC_DIR); TK_LIBRARY=`pwd`/library; export TK_LIBRARY; \
  221.     cd $$cwd; ( echo cd $(SRC_DIR)/tests\; source all\; exit ) | ./tktest
  222.  
  223. configInfo: Makefile
  224.     @rm -f configInfo
  225.     @echo "# Definitions and libraries needed to build Tk applications" >> configInfo
  226.     @echo "# (generated by the configure script):" >> configInfo
  227.     @echo "TK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
  228.     @echo "TK_X11_INCLUDES = ${X11_INCLUDES}" >> configInfo
  229.     @echo "TK_LIBS = ${X11_LIB_SWITCHES} @LIBS@" >> configInfo
  230.  
  231. install: install-binaries install-libraries install-demos install-man
  232.  
  233. install-binaries: libtk.a wish
  234.     @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
  235.         do \
  236.         if [ ! -d $$i ] ; then \
  237.         echo "Making directory $$i"; \
  238.         mkdir $$i; \
  239.         chmod 755 $$i; \
  240.         else true; \
  241.         fi; \
  242.         done;
  243.     @echo "Installing libtk.a"
  244.     @$(INSTALL_DATA) libtk.a $(LIB_INSTALL_DIR)/libtk$(VERSION).a
  245.     @$(RANLIB) $(LIB_INSTALL_DIR)/libtk$(VERSION).a
  246.     @echo "Installing wish"
  247.     @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
  248.  
  249. install-libraries:
  250.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
  251.         $(SCRIPT_INSTALL_DIR) ; \
  252.         do \
  253.         if [ ! -d $$i ] ; then \
  254.         echo "Making directory $$i"; \
  255.         mkdir $$i; \
  256.         chmod 755 $$i; \
  257.         else true; \
  258.         fi; \
  259.         done;
  260.     @echo "Installing tk.h"
  261.     @$(INSTALL_DATA) $(SRC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)
  262.     for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(SRC_DIR)/tkAppInit.c; \
  263.         do \
  264.         echo "Installing $$i"; \
  265.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
  266.         done;
  267.  
  268. install-demos:
  269.     @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
  270.         $(SCRIPT_INSTALL_DIR)/demos \
  271.         $(SCRIPT_INSTALL_DIR)/demos/images ; \
  272.         do \
  273.         if [ ! -d $$i ] ; then \
  274.         echo "Making directory $$i"; \
  275.         mkdir $$i; \
  276.         chmod 755 $$i; \
  277.         else true; \
  278.         fi; \
  279.         done;
  280.     @for i in $(SRC_DIR)/library/demos/*; \
  281.         do \
  282.         if [ -f $$i ] ; then \
  283.         echo "Installing $$i"; \
  284.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos; \
  285.         fi; \
  286.         done;
  287.     @for i in $(DEMOPROGS); \
  288.         do \
  289.         chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
  290.         done;
  291.     @for i in $(SRC_DIR)/library/demos/images/*; \
  292.         do \
  293.         if [ -f $$i ] ; then \
  294.         echo "Installing $$i"; \
  295.         $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
  296.         fi; \
  297.         done;
  298.  
  299. install-man:
  300.     @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
  301.         do \
  302.         if [ ! -d $$i ] ; then \
  303.         echo "Making directory $$i"; \
  304.         mkdir $$i; \
  305.         chmod 755 $$i; \
  306.         else true; \
  307.         fi; \
  308.         done;
  309.     @cd $(SRC_DIR)/doc; for i in *.1; \
  310.         do \
  311.         echo "Installing doc/$$i"; \
  312.         rm -f $(MAN1_INSTALL_DIR)/$$i; \
  313.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  314.             $$i > $(MAN1_INSTALL_DIR)/$$i; \
  315.         chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
  316.         done;
  317.     @cd $(SRC_DIR)/doc; for i in *.3; \
  318.         do \
  319.         echo "Installing doc/$$i"; \
  320.         rm -f $(MAN3_INSTALL_DIR)/$$i; \
  321.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  322.             $$i > $(MAN3_INSTALL_DIR)/$$i; \
  323.         chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
  324.         done;
  325.     @cd $(SRC_DIR)/doc; for i in *.n; \
  326.         do \
  327.         echo "Installing doc/$$i"; \
  328.         rm -f $(MANN_INSTALL_DIR)/$$i; \
  329.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  330.             $$i > $(MANN_INSTALL_DIR)/$$i; \
  331.         chmod 444 $(MANN_INSTALL_DIR)/$$i; \
  332.         done;
  333.  
  334. Makefile: $(SRC_DIR)/Makefile.in
  335.     $(SHELL) config.status
  336.  
  337. clean:
  338.     rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tktest wish \
  339.         config.info
  340.  
  341. distclean: clean
  342.     rm -f Makefile config.status config.cache
  343.  
  344. depend:
  345.     makedepend -- $(CC_SWITCHES) -- $(SRCS)
  346.  
  347. .c.o:
  348.     $(CC) -c $(CC_SWITCHES) $<
  349.  
  350. #
  351. # Target to check for proper usage of UCHAR macro.
  352. #
  353.  
  354. checkuchar:
  355.     -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit $(SRCS) | grep -v UCHAR
  356.  
  357. #
  358. # Target to make sure that only symbols with "Tk" prefixes are
  359. # exported.
  360. #
  361.  
  362. checkexports: libtk.a
  363.     -nm -p libtk.a | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
  364.  
  365. #
  366. # Target to create a proper Tk distribution from information in the
  367. # master source directory.  DISTDIR must be defined to indicate where
  368. # to put the distribution.
  369. #
  370.  
  371. TCLDIR      = ../tcl
  372. configure: configure.in
  373.     autoconf
  374. dist:   configure
  375.     rm -rf $(DISTDIR)
  376.     mkdir $(DISTDIR)
  377.     cp license.terms Makefile.in $(DISTDIR)
  378.     chmod 664 $(DISTDIR)/Makefile.in
  379.     cp -p $(SRCS) $(HDRS) $(DISTDIR)
  380.     mkdir $(DISTDIR)/bitmaps
  381.     @for i in bitmaps/* ; do \
  382.         if [ -f $$i ] ; then \
  383.         sed -e 's/static char/static unsigned char/' \
  384.                $$i > $(DISTDIR)/$$i; \
  385.         fi; \
  386.     done;
  387.     mkdir $(DISTDIR)/compat
  388.     cp -p license.terms $(TCLDIR)/compat/unistd.h \
  389.         $(TCLDIR)/compat/stdlib.h $(DISTDIR)/compat
  390.     cp -p README ToDo changes porting.notes porting.old $(DISTDIR)
  391.     cp -p configure configure.in $(TCLDIR)/install-sh $(DISTDIR)
  392.     chmod 775 $(DISTDIR)/configure $(DISTDIR)/configure.in
  393.     chmod +x $(DISTDIR)/install-sh
  394.     mkdir $(DISTDIR)/library
  395.     cp -p license.terms library/*.tcl library/tclIndex $(DISTDIR)/library
  396.     cp -p library/prolog.ps $(DISTDIR)/library
  397.     mkdir $(DISTDIR)/library/demos
  398.     cp -pr library/demos/*.tcl \
  399.         library/demos/tclIndex library/demos/browse \
  400.         library/demos/hello library/demos/ixset \
  401.         library/demos/rmt library/demos/rolodex \
  402.         library/demos/square \
  403.         library/demos/tcolor library/demos/timer \
  404.         library/demos/widget library/demos/README \
  405.         license.terms $(DISTDIR)/library/demos
  406.     mkdir $(DISTDIR)/library/demos/images
  407.     @for i in library/demos/images/* ; do \
  408.         if [ -f $$i ] ; then \
  409.         cp $$i $(DISTDIR)/$$i; \
  410.         fi; \
  411.     done;
  412.     mkdir $(DISTDIR)/doc
  413.     cp -p license.terms doc/*.[13n] doc/man.macros $(DISTDIR)/doc
  414.     cp /home/ouster/papers/tk4.0/tk4.0.ps $(DISTDIR)/doc
  415.     mkdir $(DISTDIR)/tests
  416.     cp -p license.terms tests/*.test tests/visual tests/*.tcl \
  417.         tests/README tests/all tests/defs tests/option.file* \
  418.         $(DISTDIR)/tests
  419.  
  420. # DO NOT DELETE THIS LINE -- make depend depends on it.
  421.